package com.dzeshko.content;

import java.util.List;

import org.json.JSONObject;

import android.util.Log;

import com.dzeshko.auth.GplusAuthHelper;
import com.dzeshko.json.JsonObjectFeed;
import com.dzeshko.json.ListJsonObject;

import extent.ParamCallback;

public class FeedContentManager {
	
private static FeedContentManager instance;
	
	public static final String TASKS_URL = "https://dl.dropbox.com/u/16403954/tasks.json";   // FIX HERE!
	
	public static final String FEED_URL = "https://www.googleapis.com/plus/v1/people/me/activities/public";		//here must be auth_code
	
	private FeedContentManager() {
		
	}
	
	public static FeedContentManager getInstance() {
		if (instance == null) {
			instance = new FeedContentManager();
		}
		return instance;
	}
	
	public void getTasks(final ParamCallback<List<JSONObject>> paramCallback) {				//FIX HERE!!!
		new ListJsonObject(paramCallback).start(TASKS_URL);
	}

	public void getToken(final ParamCallback<JSONObject> paramCallback) {				//FIX HERE!!!
		new JsonObjectFeed(paramCallback).start(GplusAuthHelper.getAuthCode());
		Log.d("Step2:jsonObjFeed", "Start Ok");
	}

}
